package com.blog.controller.admincategory;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.blog.controller.base.BaseServlet;
import com.blog.entity.TypesEntity;
import com.blog.service.admincategory.AdminCategoryService;

@WebServlet("/adminTypes")
public class AdminTypesServlet extends BaseServlet {

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		
	}

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		AdminCategoryService service = new AdminCategoryService();
		List<TypesEntity> queryAllTypes = service.queryAllTypes();
		req.setAttribute("queryAllTypes", queryAllTypes);
		forward("admin/types");
	}
}

